<script setup>
import { defineEmits } from 'vue';



const emit = defineEmits(['clickChild'])

// Define the handleClick method to update activeTabName when a tab is clicked
const handleClick = (tab) => {
  // activeTabName.value = tab.props.label; // Update the activeTabName with the clicked tab's name
  // ElMessage.success(`切换到：${tab.props.label}`); // Optional: Show a success message indicating the active tab
  //传递给父组件
  emit('clickChild',tab.props.label)

};

// const tab = ref(
//     {
//       arr:[
//         {label:"基本参数"},
//         {label:"计算方法"},
//         {label:"结果分析"},
//       ]
//     }
// )

// Provide the active tab name


</script>

<template>
  <el-tabs
      @tab-click="handleClick"
  >
    <el-tab-pane
        label="基本参数"
        name="first"
      >
    </el-tab-pane>
    <el-tab-pane
        label="计算方法"
        name="second">
    </el-tab-pane>
    <el-tab-pane
        label="结果分析" name="third">
    </el-tab-pane>
    <el-tab-pane
        label="属性表" name="fifth">
    </el-tab-pane>
    <el-tab-pane
        label="河道剖面" name="fourth">
    </el-tab-pane>
    <el-tab-pane
        label="按区域统计结果" name="seventh">
    </el-tab-pane>
  </el-tabs>
</template>

<style scoped>





</style>